// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_PRODUCT_PRICE_HISTORY
// * CreateDate    : 2011/8/16 10:16:40
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/16 10:16:40
// * LastChanger   : 2011/8/16 10:16:40
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class MstProductPriceHistoryEntity : EntityBase
    {
        public MstProductPriceHistoryTable TableSchema
        {
            get
            {
                return MstProductPriceHistoryTable.Current;
            }
		}
		
		public MstProductPriceHistoryEntity()
        {

        }
		
		public MstProductPriceHistoryEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.HistoryId = Convert.ToString(CommonFunctions.ToObject(dr["HISTORY_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.UpdatePriceDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATE_PRICE_DATE"]));
			this.UpdatePriceUser = Convert.ToString(CommonFunctions.ToObject(dr["UPDATE_PRICE_USER"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public MstProductPriceHistoryEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.HistoryId = Convert.ToString(CommonFunctions.ToObject(dr["HISTORY_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.UpdatePriceDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATE_PRICE_DATE"]));
			this.UpdatePriceUser = Convert.ToString(CommonFunctions.ToObject(dr["UPDATE_PRICE_USER"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstProductPriceHistoryTable.Current;
            }
        }
		
		#region Perporty List
        public string HistoryId
        {
            get { return Convert.ToString(GetData(MstProductPriceHistoryTable.C_HISTORY_ID)); }
            set { SetData(MstProductPriceHistoryTable.C_HISTORY_ID, value); }
        }
		
        public string ProductId
        {
            get { return Convert.ToString(GetData(MstProductPriceHistoryTable.C_PRODUCT_ID)); }
            set { SetData(MstProductPriceHistoryTable.C_PRODUCT_ID, value); }
        }
		
        public string SupplierId
        {
            get { return Convert.ToString(GetData(MstProductPriceHistoryTable.C_SUPPLIER_ID)); }
            set { SetData(MstProductPriceHistoryTable.C_SUPPLIER_ID, value); }
        }
		
        public decimal Price
        {
            get { return Convert.ToDecimal(GetData(MstProductPriceHistoryTable.C_PRICE)); }
            set { SetData(MstProductPriceHistoryTable.C_PRICE, value); }
        }
		
        public DateTime UpdatePriceDate
        {
            get { return Convert.ToDateTime(GetData(MstProductPriceHistoryTable.C_UPDATE_PRICE_DATE)); }
            set { SetData(MstProductPriceHistoryTable.C_UPDATE_PRICE_DATE, value); }
        }
		
        public string UpdatePriceUser
        {
            get { return Convert.ToString(GetData(MstProductPriceHistoryTable.C_UPDATE_PRICE_USER)); }
            set { SetData(MstProductPriceHistoryTable.C_UPDATE_PRICE_USER, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(MstProductPriceHistoryTable.C_REMARK)); }
            set { SetData(MstProductPriceHistoryTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

